package mbp.gui.frames;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import mbp.base.GuiFunction;
import mbp.core.Resource;
import mbp.gui.base.IListPanel;
import mbp.gui.panels.ResourceEditPanel;

public class ResourceEditor extends JFrame {

	private JPanel contentPane;


	/**
	 * Create the frame.
	 */
	public ResourceEditor(Resource resource, GuiFunction guiFunction, IListPanel listPenel) 
	{
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 326, 366);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		ResourceEditPanel resourceEditPanel = new ResourceEditPanel(guiFunction, listPenel);
		contentPane.add(resourceEditPanel);
		resourceEditPanel.loadResource(resource);
	}
}
